1. Field of the Invention
The present invention relates to an ALC (Automatic Level Control) circuit for automatically adjusting the gain of an amplifier to establish an output signal level from the amplifier at a predetermined level.
2. Description of the Related Art
Many electronic cameras, such as a digital camera, a digital video camera, or the like, have a sound recording capability to record audio input through a microphone and a moving image recording capability to record moving images. Such an electronic camera having a sound recording capability generally includes a circuit for automatically adjusting the gain of an amplifier installed in a stage prior to a recording stage in accordance with a level of an input audio signal when the sound is recorded.
FIG. 6 shows an automatic level control circuit in a digital detection system using a programmable gain amplifier. In the automatic level control circuit of FIG. 6, an input audio signal amplified by a programmable gain amplifier 10 is converted from an analog signal into a digital signal by an analog/digital converter (an A/D converter) 20 installed in a stage after the programmable gain amplifier 10. Next, the level of the digital signal (an output signal level from the programmable gain amplifier 10) is detected by a level detector 30 and then compared with a predetermined reference level. Based on an obtained comparison result, the gain of the programmable gain amplifier 10 is adjusted according to a control signal output from a gain controller 40 to the programmable gain amplifier 10 such that the output audio signal from the programmable gain amplifier 10 (i.e. the input audio signal having been amplified by the programmable gain amplifier 10) is set to a predetermined audio signal level.
More specifically, when the level of the digital signal detected by the level detector 30 is greater than the predetermined reference level, an operation for stepping down the gain of the programmable gain amplifier 10 by one step (an attack action) is performed, whereas an operation for stepping up the gain of the programmable gain amplifier 10 by one step (a recovery action) is performed when the level of the digital output signal is smaller than the predetermined reference level. By continuously repeating such adjustment to the gain achieved by the attack and recovery actions until the level of the digital signal reaches the predetermined reference level, the amplifier gain can be automatically controlled in accordance with the level of the input audio signal at the predetermined reference level, which enables the recording of audio input at a desired audio signal level.
The attack action performed in the automatic level control circuit is generally completed in a short time to minimize an adverse effect that an audio waveform loses its accurate shape due to an excessively large signal beyond a dynamic range. Further, when discrete amplifier gain control is digitally performed in the automatic level control circuit described above, a step which could arise in an output waveform when the gain is modified may become a cause of noise. Therefore, to prevent the occurrence of such a step, modification to the gain achieved by the attack action is generally performed only at a zero crossing time.
However, when the modification to the gain by the attack action is only performed at the zero crossing time, the attacking time varies depending on a signal frequency. Especially when the signal frequency is low and intervals of the zero crossing times are relatively long, an interval between times when the gain is modified is extended, thereby making it difficult to complete the attack action and resulting in a lengthy attacking time (a period of time to decrease the gain).
As a countermeasure to prevent the attacking time from being lengthened, the decrease in gain achieved by the attack action can be computed irrespective of the zero crossing time, with only the operation of outputting a computed result to the programmable gain amplifier limited to performance only at the zero crossing time. However, such a measure will create a problem as described below.
Typically, in the level detector, a comparison between the level of the digital signal and the predetermined reference level is performed at the timing of a clock signal, and, when the comparison result showing that the level of the digital signal is greater than the predetermined reference level is obtained a predetermined number of times in succession, a detection result indicating that the amplifier gain of the programmable gain amplifier should be reduced by one step is obtained. Then, when the above-described situation further continues for the same predetermined number of times, the detection result indicating that the amplifier gain should be reduced by one step is obtained again. At the subsequent zero crossing time, the total number of steps accumulated in the detection results obtained until then is output along with an attack action control signal to instruct reduction of the amplifier gain, to thereby reduce the amplifier gain by an amount equivalent to the total number of steps. When the detection result is obtained three times in a period from a zero crossing time to a subsequent zero crossing time, for example, the amplifier gain will be reduced by three steps at the subsequent zero crossing time.
Here, when the processes of comparison and detection described above are performed in a situation where the interval between the zero crossing times is long, it is likely that the amplifier gain which would be optimally reduced only by one step in the first place is reduced by more than one steps due to accumulation of the number of steps in the detection results obtained until the next zero crossing time. If such excessive reduction is performed, it becomes necessary to perform a recovery action in a subsequent process, which results in unnatural operating conditions.